<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>天盈CRM</title>
    <link rel="stylesheet" href="__PUBLIC__/frame/layui/css/layui.css">
    <link rel="stylesheet" href="__PUBLIC__/frame/static/css/style.css">
    <link rel="stylesheet" href="__PUBLIC__/frame/static/css/icon/iconfont.css">
    <link rel="icon" href="__PUBLIC__/frame/static/image/code.png">
</head>
<body>

<!-- layout admin -->
<div class="layui-layout layui-layout-admin"> <!-- 添加skin-1类可手动修改主题为纯白，添加skin-2类可手动修改主题为蓝白 -->
    <!-- header -->
    <div class="layui-header my-header">
        <a href="/">
            <img class="my-header-logo" src="__PUBLIC__/frame/static/image/code.png" alt="logo">
            <div class="my-header-logo">天盈 CRM</div>
        </a>
        <div class="my-header-btn">
            <button class="layui-btn layui-btn-small btn-nav"><i class="layui-icon">&#xe65f;</i></button>
        </div>
        <!-- 天气信息 -->
        <div class="weather" pc>
            <div id="tp-weather-widget"></div>
        </div>
        <!-- 顶部右侧添加选项卡监听 -->
        <ul class="layui-nav my-header-user-nav" lay-filter="side-top-right">
            <!-- <li class="layui-nav-item"><a href="javascript:;" class="pay" href-url="">支持作者</a></li>
            <li class="layui-nav-item">
                <a class="name" href="javascript:;"><i class="layui-icon">&#xe629;</i>主题</a>
                <dl class="layui-nav-child">
                    <dd data-skin="0"><a href="javascript:;">默认</a></dd>
                    <dd data-skin="1"><a href="javascript:;">纯白</a></dd>
                    <dd data-skin="2"><a href="javascript:;">蓝白</a></dd>
                </dl>
            </li> -->
            <li class="layui-nav-item"><a href="javascript:void(0);" id="lockScreen"><i class="iconfont">&#xe907;</i>锁屏</a></li>
            <li class="layui-nav-item">
                <a class="name" href="javascript:;" ><img src="__PUBLIC__/frame/static/image/code.png" alt="logo"><?php echo $_SESSION['staff_info']['nickname'];?></a>
                <dl class="layui-nav-child">
                    <dd><a href="<?php echo U('Login/outlogin');?>"><i class="layui-icon">&#x1006;</i>退出</a></dd>
                </dl>
            </li>
        </ul>

    </div>
    <!-- side -->
    <div class="layui-side my-side">
        <div class="layui-side-scroll">
            <!-- 左侧主菜单添加选项卡监听 -->
            <ul class="layui-nav layui-nav-tree" lay-filter="side-main">
                
            </ul>

        </div>
    </div>
    <!-- body -->
    <div class="layui-body my-body">
        <div class="layui-tab layui-tab-card my-tab" lay-filter="card" lay-allowClose="true">
            <ul class="layui-tab-title">
                <li class="layui-this" lay-id="1"><span><i class="layui-icon">&#xe638;</i>欢迎页</span></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe id="iframe" src="<?php echo U('welcome')?>" frameborder="0"></iframe>
                </div>
            </div>
        </div>
    </div>
    <!-- footer -->
    <div class="layui-footer my-footer">
        <p><a target="_blank">hawk-admin后台模板v1.0.0</a>&nbsp;&nbsp;&&nbsp;&nbsp;<a target="_blank">天盈 CRM 管理系统v1.0.0</a></p>
        <p>2017 © copyright 蜀ICP备17005881号</p>
    </div>
</div>

<!-- pay -->
<div class="my-pay-box none">
    <div><img src="__PUBLIC__/frame/static/image/zfb.png" alt="支付宝" width="300"><p>支付宝</p></div>
    <div><img src="__PUBLIC__/frame/static/image/wx.png" alt="微信" width="300"><p>微信</p></div>
</div>

<!-- 右键菜单 -->
<div class="my-dblclick-box none">
    <table class="layui-tab dblclick-tab">
        <tr class="card-refresh">
            <td><i class="layui-icon">&#x1002;</i>刷新当前标签</td>
        </tr>
        <tr class="card-close">
            <td><i class="layui-icon">&#x1006;</i>关闭当前标签</td>
        </tr>
        <tr class="card-close-all">
            <td><i class="layui-icon">&#x1006;</i>关闭所有标签</td>
        </tr>
    </table>
</div>
<script type="text/javascript" src="__PUBLIC__/frame/layui/layui.js"></script>
<script type="text/javascript" src="__PUBLIC__/frame/static/js/vip_comm.js"></script>
<script type="text/javascript" src="__PUBLIC__/frame/static/js/vip_nav.js"></script>
<script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script","tpwidget","//widget.seniverse.com/widget/chameleon.js"))</script>
            <script>tpwidget("init", {
                "flavor": "slim",
                "location": "WX4FBXXFKE4F",
                "geolocation": "enabled",
                "language": "zh-chs",
                "unit": "c",
                "theme": "chameleon",
                "container": "tp-weather-widget",
                "bubble": "disabled",
                "alarmType": "badge",
                "color": "#FFFFFF",
                "uid": "U9EC08A15F",
                "hash": "039da28f5581f4bcb5c799fb4cdfb673"
            });
            tpwidget("show");</script>
<script type="text/javascript">
	layui.use(['layer','vip_nav','jquery'], function () {

	    // 操作对象
	    var layer = layui.layer ,vipNav = layui.vip_nav ,$ = layui.jquery;

        var lockscreen = function() {
            document.oncontextmenu=new Function("event.returnValue=false;");
            document.onselectstart=new Function("event.returnValue=false;");
            layer.open({
                title: false,
                type: 1,
                content: '<div class="lock-screen"><input type="password" id="unlockedPwd" class="layui-input" placeholder="请输入登录密码解锁..." autocomplete="off"><button id="unlocked" class="layui-btn">解锁</button><div id="unlockTips"></div></div>',
                closeBtn: 0,
                shade: 0.95,
                offset: '350px'
            });

            $('#unlocked').click(function() {
                var pwd = $('#unlockedPwd').val();
                if (pwd == '') {
                    return false;
                }
                $.post('/index.php/Hawk/Index/unlocked', {password:pwd}, function(data) {
                    var res = eval('(' + data + ')');
                    if (res.code == 1) {
                        window.sessionStorage.setItem("lockscreen", false);
                        layer.closeAll();
                    } else {
                        $('#unlockTips').html(res.msg);
                        setTimeout(function(){
                            $('#unlockTips').html('');
                        }, 3000);
                    }
                });
            });
        }
        /* 锁屏 */
        $('#lockScreen').click(function () {
            window.sessionStorage.setItem("lockscreen", true);
            lockscreen();
        });
        if(window.sessionStorage.getItem("lockscreen") == "true"){
            lockscreen();
        }

	    // 顶部左侧菜单生成 [请求地址,过滤ID,是否展开,携带参数]
	    vipNav.top_left("__PUBLIC__/hawk/json/nav_top_left.json",'side-top-left',false);
	    // 主体菜单生成 [请求地址,过滤ID,是否展开,携带参数]
	    vipNav.main("/index.php/Hawk/Index/left",'side-main',false);
	    // you code ...
	});
</script>
</body>
</html>